type RowOptionsParams<T = any> = {
  labelKey: string;
  valueKey: string;
  iconKey?: string;
  rows: T[];
};
export type RowData = {
  label: string;
  value: string;
  key: string;
  title: string;
};
export const rowsToOptions = (config: RowOptionsParams): RowData[] => {
  return config.rows.map((e) => {
    return {
      label: e![config.labelKey],
      value: e![config.valueKey],
      title: e![config.labelKey],
      key: e![config.labelKey]
    };
  });
};
